package Devel::SearchINC::FindLib;

use strict;
use warnings;
use File::Find;


our $VERSION = '1.33';


sub import {
    my $pkg = shift;
    for my $path (@_) {
        find(sub {
            return unless -d;

            if (/^t|CVS|\.svn|blib|skel$/) {
                $File::Find::prune = 1;
                return;
            }

            if ($_ eq 'lib') {
                $File::Find::prune = 1;
                unshift @INC, $File::Find::name;
            }
        }, $path);
    }
    unshift @INC, split /:/ => $ENV{SEARCHINC_FIRST}
        if defined $ENV{SEARCHINC_FIRST};
}


1;


__END__

{% USE p = PodGenerated %}

=head1 NAME

{% p.package %} - Find lib/ directories and prepend them to @INC

=head1 SYNOPSIS

    {% p.package %}->new;

=head1 DESCRIPTION

None yet.

=head1 METHODS

=over 4

{% p.write_methods %}

=back

{% p.write_inheritance %}

{% PROCESS standard_pod %}

=cut

